<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理</title>
<link rel="stylesheet" href="<?php echo base_url('publics/admin');?>/style/styles.css" />
<script type="text/javascript" src="<?php echo base_url('publics')?>/js/jquery.js"></script>
</head>

<body>
<div id="main_right">
	<div id="r_title">
		<div id="r_title_content">
			角色管理 &gt; 角色列表
		</div>
	</div>
	<div class="line_white"></div>
	<div id="r_menu">
		<ul>
			<li><a href="<?php echo site_url('manage/role');?>">返回列表</a></li>
		</ul>
	</div>
	<div id="r_list">
    <form action="<?php echo base_url('manage/role/edit');?>" method="post" onsubmit="return na_check_form();">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:50px;">
		 <tr>
			<td width="10%" height="35" align="center">角色名称</td>
			<td width="90%" style="text-align:left;">
				<?php echo $r_val['role_name'];?>
			</td>
		  </tr>
          <tr>
			<td width="10%" height="35" align="center">管理权限</td>
			<td width="90%" id="check_box_in">
				<?php foreach($rolesOneArr as $rolesOneRows):?>
				<?php if($rolesOneRows['menu_pid'] == 0):?>	
				<div style="">
					<h4><?=$rolesOneRows['menu_name'];?></h4><br>
						<?php if(!empty($rolesSonArr[$rolesOneRows['menu_id']])):?>
						<?php foreach($rolesSonArr[$rolesOneRows['menu_id']] as $rolesSonRows):?>
							<div style="height:25px; height:25px;">
							<?=$rolesSonRows['menu_name']?>：
							<?php if(!empty($rolesSonRows['sonArr'])):?>
							<?php foreach($rolesSonRows['sonArr'] as $k=>$v):?>
								 <span class="juese_in" id="<?php echo $v['menu_id'];?>"><?php echo $v['menu_name'];?></span>
							<?php endforeach;?>	
							<?php endif;?>
							</div>
						<?php endforeach;?>
						<?php endif;?>
				</div>
				<?php endif;?>
				<?php endforeach;?>
			</td>
		  </tr>
		</table>
        </form>
		<input type="hidden" value="<?=$r_val['role_popedom']?>" id="role_popedom" />
	</div>
</div>
</body>
</html>
<script>
$(function(){
	var role_p=$('#role_popedom').val();
	$('#check_box_in span').each(function(){
		var role_c=$(this).attr('id');
		if(role_p.indexOf(role_c) != -1)
		{
			$(this).css({'background-color':'#427FB8','color':'#fff'});
		}
	});
});
</script>